using AnimatingHair.Auxiliary;
using AnimatingHair.Entity.PhysicalEntity;
using OpenTK;

namespace AnimatingHair.Initializing
{
    class BustInitializer
    {
        private const double headSize = 1.0;
        private const double shouldersWidth = 1.3;
        private const double shouldersRadius = 0.66;
        private const double shoulderPosY = -2.46;
        private const double shoulderPosZ = -0.51;

        private Bust bust;

        public Bust InitializeBust()
        {
            bust = new Bust
                   {
                       Mass = Const.DefaultParticleMass,

                       Head = new Geometry.Sphere
                       {
                           Center = new Vector3d( 0, 0, 0 ),
                           Radius = headSize
                       },

                       Neck = new Geometry.Cylinder(
                           new Vector3d( 0, -0.3, -0.16 ),
                           new Vector3d( 0, -2.5, -0.397 ),
                           0.54 ),

                       Shoulders = new Geometry.Cylinder(
                           new Vector3d( -shouldersWidth, shoulderPosY, shoulderPosZ ),
                           new Vector3d( shouldersWidth, shoulderPosY, shoulderPosZ ),
                           shouldersRadius ),

                       ShoulderTipLeft = new Geometry.Sphere
                       {
                           Center = new Vector3d( -shouldersWidth, shoulderPosY, shoulderPosZ ),
                           Radius = shouldersRadius
                       },

                       ShoulderTipRight = new Geometry.Sphere
                       {
                           Center = new Vector3d( shouldersWidth, shoulderPosY, shoulderPosZ ),
                           Radius = shouldersRadius
                       }
                   };

            return bust;
        }
    }
}
